package com.xbongbong.pro.statistic.manager.feign;

import com.xbongbong.paas.pojo.ChartDTO;
import com.xbongbong.paas.toolbox.wrap.BaseVO;
import com.xbongbong.paas.toolbox.wrap.XbbResponse;
import com.xbongbong.pro.form.pojo.dto.HomePageDeleteDTO;
import com.xbongbong.pro.statistic.through.pojo.dto.ResultThroughDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author zhouwq
 * @date 2020/12/15 9:34
 */
@FeignClient(name = "pro-web-pc",contextId = "paasFormFeignClient")
public interface PaasFormFeignClient {
    /**
     * 首页列表配置删除 by 图表categoryId
     * @param homePageDeleteDTO 入参
     * @param lang
     * @return 回参
     */
    @RequestMapping(value = "/pro/v1/form/homePageDelete", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
    XbbResponse<BaseVO> homePageDelete(@RequestBody HomePageDeleteDTO homePageDeleteDTO, @RequestParam("lang") String lang);

    /**
     * 自定义指标穿透
     * @param resultThroughDTO
     * @param lang
     * @return
     * @author xinpeng.jiang
     * @date 2021/5/11 19:52
     * @version 1.0
     */
    @RequestMapping(value = "/pro/v1/indexThrough/through", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
    String customChartResultThrough(@RequestBody ResultThroughDTO resultThroughDTO, @RequestParam("lang") String lang);

    /**
     * 获取所有分类,pk榜用
     * @param chartDTO
     * @param lang
     * @return java.lang.String
     * @author xinpeng.jiang
     * @date 2021/5/13 19:43
     * @version 1.0
     */
    @RequestMapping(value = "/pro/v1/pk/set/getCategoryList4Pk", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
    String getCategoryList4Pk(@RequestBody ChartDTO chartDTO, @RequestParam("lang") String lang);

}
